<template>
  <div>
    <div class="shareData">
      <div class="shareTitle">
        {{ item.title }}
      </div>
      <div class="shareCenter">
        {{ item.content }}
      </div>
      <div class="shareFooter">
        <span><img :src="baseURL + item.author.avatar" alt=""/></span>
        <span class="name">{{ item.author.nickname }}</span>
        <div class="footer">
          <span>{{ item.created_at | filetname }}</span>
          <div class="num">
            <span class="iconfont">&#xe65b; </span>
            <span>{{ item.read }}</span>
            <span class="iconfont">&#xe638;</span>
            <span>{{ item.star }}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ['item'],
  data () {
    return {
      baseURL: process.env.VUE_APP_BASEURL
    }
  },
  created () {},
  methods: {}
}
</script>
<style lang="less" scoped>
.shareData {
  padding: 15px 15px 0;
  background-color: #fff;
  .shareTitle {
    font-size: 16px;
    color: #181a39;
    font-weight: 600;
    line-height: 23px;
    margin-bottom: 15px;
  }
  .shareCenter {
    font-size: 13px;
    font-weight: 400;
    color: #b3b4c0;
    line-height: 19px;
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .shareFooter {
    display: flex;
    justify-content: space-between;
    line-height: 45px;
    border-bottom: 1px solid #f8f5f6;

    img {
      height: 22px;
      width: 22px;
      border-radius: 50%;
    }
    .name {
      flex: 1;
      font-size: 12px;
      color: #545671;
      font-weight: 400;
      text-align: left;
      margin-left: 10px;
    }
    .footer {
      opacity: 1;
      font-size: 12px;
      font-weight: 400;
      color: #b4b4bd;
      line-height: 17px;
      display: flex;
      justify-content: space-between;
      margin-top: 16px;
      .num {
        display: flex;
        padding-right: 10px;
        span {
          margin-left: 15px;
        }
      }
    }
  }
}
</style>
